<template>
  <div class="hello-ezuikit-js">
    <div id="video-container5"></div>
    {{message}}
    
  </div>
</template>

<script>
import EZUIKit from "ezuikit-js";

var player10 = null;
export default {

  name: "HelloWorld",
   props: ['message'],
  data: function () {
    return {
      player10: null,
      tokenstr: "",
      cData: []
    };
  },
 watch: {
    message: function (newData) {
      this.cData = newData
      this.jk()
    }
  },
  mounted: () => {
  },
  methods: { 
    jk(){
        fetch("http://112.102.225.89:51006/zwgl/dtwlwjc/zwglDatianMonitoring/getys", {
        method: "POST",
        })
        .then((response) => response.json())
        .then((res) => {
            var accessToken = res.result;
            console.log("监控", accessToken);
            player10 = new EZUIKit.EZUIKitPlayer({
            //摄像头4
            id: "video-container5",
            accessToken: accessToken,
            url: this.cData,
            template: "pcLive",
            header: ["zoom"],
            plugin: ["talk", "zoom"],
            width: 850,
            height: 340,
            });
        });
    }
  },
};
</script>
<style>
.hello-ezuikit-js {
  margin-left: 20px;
}
#video-container4 {
}
#video-container4-wrap {
  left: 108px;
  top: 2px;
}
</style>
